import EaInput from './input/EaInput';
import EaButton from './button/EaButton';
import EaTable from './table/EaTable';
import EaTableColumn from './table/EaTableColumn';
import EaButtonGroup from './button/EaButtonGroup';
import EaForm from './form/EaForm';
import EaFormItem from './form/EaFormItem';
import EaAutocomplete from './autocomplete/EaAutocomplete';

const components = [
  EaInput,
  EaButton,
  EaTable,
  EaTableColumn,
  EaButtonGroup,
  EaForm,
  EaFormItem,
  EaAutocomplete
];

const install = function (Vue, opts = {}) {
  components.forEach(component => {
    Vue.component(component.name, component);
  });
};
/* istanbul ignore if */
if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue);
}

export default install;
